//2009/08/10 02:39:42
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <algorithm>

using namespace std;

class DinkyFish
{
public:
    int monthsUntilCrowded(int tankVolume, int maleNum, int femaleNum)
    {
		int increase;
		if(maleNum + femaleNum > 2 * tankVolume) return 0;
		if(femaleNum < maleNum) increase = femaleNum;
		else increase = maleNum;
		return 1 + monthsUntilCrowded(tankVolume, maleNum + increase, femaleNum + increase);
    }
};
